//这个文件用来拦截路径并制造假数据

import Mock from "mockjs"
import homeApi from "./mockData/home"
import userApi from "./mockData/user"
import menuApi from "./mockData/permission"

// Mock.mock()里面有三个参数，1：拦截的路径(用正则表达式写),    2:方法，   3：制造除的假数据(home.js里面的)
Mock.mock(/api\/home\/getTableData/,"get",homeApi.getTableData)
Mock.mock(/api\/home\/getCountData/,"get",homeApi.getCountData)
Mock.mock(/api\/home\/getChartData/,"get",homeApi.getChartData)
Mock.mock(/api\/user\/getUserData/,"get",userApi.getUserData)
Mock.mock(/api\/user\/deleteUser/,"get",userApi.deleteUser)
Mock.mock(/api\/user\/addUser/,"post",userApi.createUser)
Mock.mock(/api\/user\/editUser/,"post",userApi.updateUser)
Mock.mock(/api\/permission\/getMenu/,"post",menuApi.getMenu)